The Decompression Parameters Structure
Several fields of the decompression parameters structure (
CodecDecompressParams
) are relevant to effects, and in particular are used when you are writing your own effect component. This section describes only those fields of this data structure that apply to effects; for a complete description of the decompression parameters structure, see Chapter 4, "Image Compressor Components."
struct CodecDecompressParams {
...
CodecCapabilities *capabilities;
...
ICMFrameTimePtr frameTime;
...
UInt16 majorSourceChangeSeed;
UInt16 minorSourceChangeSeed;
CDSequenceDataSourcePtr sourceData;
...
OSType **wantedDestinationPixelTypes;
...
Boolean needUpdateOnTimeChange;
...
Boolean needUpdateOnSourceChange;
...
long requestedBufferWidth;
long requestedBufferHeight;
};
typedef struct CodecDecompressParams CodecDecompressParams;
Field descriptions
-
capabilities
-
A pointer to a
CodecCapabilities
data structure containing the required capabilities of the effect.
-
frameTime
-
The current frame time. The information in this parameter can be used to calculate the current frame number, relative to the total duration of the effect.
-
majorSourceChangeSeed
-
An integer value that is incremented each time a data source is added or removed. This provides a fast way for an effect component to know when its data sources have changed.
-
minorSourceChangeSeed
-
An integer value that is incremented each time a data source is added or removed, or the data contained in any of the sources changes.This provides a fast way for an effect component to know when a source changes.
-
sourceData
-
A pointer to a
CDSequenceDataSource
structure that contains the head of a linked list of all data sources. Because each data source contains a link to the next data source, an effect component can access all data sources from this field.
-
wantedDestinationPixelTypes
-
A handle to a zero-terminated list of non-RGB pixel formats that the component can decompress. Set this value to
nil
if your component does not support non-RGB pixel spaces. If your effect component supports non-RGB pixel formats, your component's
"MyEffectSetup"
function should place the list of them into this field.The Image Compression Manager (ICM) copies this data structure, so it is up to your component to dispose of it later. It is suggested that components allocate this handle during the
Open
routine and dispose of it during the
Close
routine.
-
needUpdateOnTimeChange
-
Setting this field to
true
indicates to the ICM that your component's
EffectBegin
and
EffectRenderFrame
functions should be called whenever the time of the movie changes.The default value of this field is
true
.
-
needUpdateOnSourceChange
-
Setting this field to
true
indicates to the ICM that your component's
EffectBegin
and
EffectRenderFrame
functions should be called whenever one or more of the sources to the effect changes. The default value of this field is
false
.
-
requestedBufferWidth
-
Specifies the width of the image buffer to use, in pixels. For this value to be used, the
codecWantsSpecialScaling
flag in the
CodecCapabilities
record must be set.
-
requestedBufferHeight
-
Specifies the height of the image buffer to use, in pixels. For this value to be used, the
codecWantsSpecialScaling
flag in the
CodecCapabilities
record must be set.
© 1999 Apple Computer, Inc.
| Previous | Chapter Contents | Chapter Top | Next |